<?php

use RingCentral\Psr7\Response;

function handler($request, $context)
{
    $body = $request->getBody()->getContents();

    $logger = $GLOBALS['fcLogger'];
    $logger->info('request body:' . $body);

    return new Response(
        200,
        array(
            'hello_header1' => 'aaa',
            'hello_header2' => ['bbb', 'ccc'],
            'Content-Type2' => 'application/json'
        ),
        'hello world'
    );
}

//function initialize($context)
//{
//    $logger = $GLOBALS['fcLogger'];
//    $logger->info("initialize...");
//}
//
//function preStop($context)
//{
//    $logger = $GLOBALS['fcLogger'];
//    $logger->info("preStop...");
//}